<template>
  <el-form ref="formRef" :model="form" label-position="top" :label-width="140">
    <div class="v-title my-3">报废信息</div>
    <div class="grid grid-cols-2 gap-x-3 mb-5">
      <div>
        <strong>sku: </strong> {{ form.sku }}
      </div>
      <div>
        <strong>报废数量: </strong> {{ form.process_num }}
      </div>
    </div>
    <div class="v-title my-3">补货信息</div>
    <div class="grid grid-cols-2 gap-x-3">
      <el-form-item label="物流方式" prop="lc_id">
        <el-select v-model="form.lc_id" filterable class="w-full" placeholder="请选择">
          <el-option v-for="(d, i) in options.logisticsOptions" :key="i" :label="d.label" :value="d.value" />
        </el-select>
      </el-form-item>
      <el-form-item label="运单号" prop="logistics_number">
        <el-input v-model="form.logistics_number" placeholder="账号类型" class="w-full" />
      </el-form-item>
      <el-form-item label="预计到货时间">
        <el-date-picker v-model="form.except_deliver_time" placeholder="日期选择" type="date" value-format="YYYY-MM-DD"
          class="w-full" />
      </el-form-item>
      <el-form-item label="sku">
        <el-input v-model="form.sku" placeholder="sku" class="w-full" disabled />
      </el-form-item>
    </div>
    <el-form-item label="补货数量">
      <el-input v-model="form.process_num" placeholder="sku" class="w-full" disabled />
    </el-form-item>

    <div>是否确认通知仓库等待补货？</div>
  </el-form>
</template>

<script setup>
const props = defineProps({
  modelValue: { type: Object, default: () => ({}) },
  options: { type: Object, default: () => ({}) },
})
const emit = defineEmits(['update:modelValue'])
const form = computed({
  get() {
    return props.modelValue
  },
  set(val) {
    emit('update:modelValue', val)
  }
})
const formRef = ref()
const validate = async () => await true
defineExpose({ validate })
</script>